<?php
//前台首页控制器
class IndexController extends Controller {
	//定义index方法，显示首页
	public function indexAction(){
		//获取所有商品分类
		$categoryModel = new CategoryModel('category');
		$cats = $categoryModel->frontCats();
		//var_dump($cats);
		//获取推荐商品
		$goodsModel = new GoodsModel('goods');
		$bestGoods = $goodsModel->getBestGoods();

		//载入模板页面
		include CUR_VIEW_PATH . "index.html";
	}
	public function listAction(){
		include CUR_VIEW_PATH . "list.html";
	}
}